package com.business_clean.ui.adapter.home;

import android.widget.ImageView;

import com.business_clean.R;
import com.business_clean.app.uitl.GlideUtil;
import com.business_clean.data.mode.workbench.HomeGridItem;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;

import org.jetbrains.annotations.NotNull;

public class HomeItemAdapter extends BaseQuickAdapter<HomeGridItem, BaseViewHolder> {

    public HomeItemAdapter() {
        super(R.layout.item_home_item);
    }

    @Override
    protected void convert(@NotNull BaseViewHolder holder, HomeGridItem item) {
        ImageView imageView = holder.getView(R.id.iv_item_pic);
        GlideUtil.loadPic(imageView.getContext(), item.getIcon_url(), imageView);
        holder.setText(R.id.tv_item_name, item.getName());
    }
}